home *** CD-ROM | disk | FTP | other *** search
- Path: condor.acc.iit.edu!usenet
- From: access <access@intercom.com>
- Newsgroups: comp.lang.c++
- Subject: [Q] Working through C++ - some help needed
- Date: Tue, 26 Mar 1996 23:27:35 -0800
- Organization: Illinois Institute of Technology
- Message-ID: <3158EDE7.2C27@intercom.com>
- NNTP-Posting-Host: host44.rice.iit.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Working my way through the "forest" of C++, I try to work on an exercise
- that is more like invented, than a proven workable problem - but I
- thought of being of help in understanding different concepts in C++. I am
- trying to build the followings (based on classes, rather than one
- single lenghty algorithm):
- - An array list (having the regular functions, like the ones shown
- everywhere in the books: get, put, moveto, gotostart, gotoend, etc.),
- which will contain a different queue in each of its elements, queues
- being distinguished by a number (with pop and push functions, at least)
- which queue will contain nodes (... remember the Russian dols :-) ...),
- and each node will contain a couple of the most significant elements of
- C++ (a char, an int, a string, for example).
- Now, being said the above, I don't know how to start building and how to
- access the elements of each node (I don't even know if it is possible)
- either by user input or from a file. What I try actually would be
- something like: given an element with the int as the array element where
- its queue is to be placed, how do I actually put it there using the
- normal messages such constructions would come with (like: read the whole
- element from a file as a string which has the data separated by blanks -
- int, char and string, then taking the int and deciding what element in
- the array it is going to go into, then taking the char and the string and
- building the actual element and attaching it to the queue in the decided
- array element). Did anybody make any sense out of this? If the answer is
- YES, would any kind soul enlighten me on whether this would be possible
- to build, and actually how to manipulate the messages of the different
- classes I see being built (class array_list, class My_queue and class
- My_queue_node) to put/remove the elements?
- Thanks a lot to whoever had the patience to read through this lenghty and
- senseless message, and mostly to whoever would care to answer me if this
- is "mission impossible".
-
- Sleepless_C++
-